package com.xsz.entity;

import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Set;

@Entity
@Table(name="tb_meeting")
@Getter
@Setter
public class Meeting implements Serializable {
    /**
     *
     */
    private static final long serialVersionUID = 1L;

    /**主键ID**/
    @Id
    @Column(length=60)
    private String id;

    @Column(length=30)
    /**会议标题**/
    private String title;

    /**会议地点**/
    private String address;

    /**会议时间**/
    private String startTime;

    /**会议人员**/
    private String people;

    /**下载路径**/
    @Column(length=90)
    private String dow;

    @ManyToMany(fetch=FetchType.EAGER)//立即从数据库中进行加载数据;
    @JoinTable(name = "TbMeetUser", joinColumns = { @JoinColumn(name = "mid") }, inverseJoinColumns
            ={@JoinColumn(name = "uid") })
    private Set<User> users;// 一个会议有多个用户
}
